﻿using System;

class EratoShtenes
{
    static void Main(string[] args)
    {
        int[] arr = new int[1000];
        for (int i = 0; i < arr.Length; i++)
        {
            arr[i] = i + 1;
        }
        for (int i = 1; i < arr.Length; i++)
        {
            if (arr[i] > 0)
            {
                for (int j = 2; j < arr.Length / (i + 1); j++)
                {
                    arr[(j * (i + 1)) - 1] = 0;
                }
            }
        }
        for (int i = 0; i < arr.Length; i++)
        {
            if (arr[i] != 0)
            {
                Console.WriteLine(arr[i]);
            }
        }
    }
}

